package com.cheng.student.utils;

import java.util.regex.Pattern;

public class Util
{
    public static boolean isOnlyNumber(String str)
    {
        Pattern pattern = Pattern.compile("[0-9]*");
        return pattern.matcher(str).matches();
    }

    public static void main(String[] args)
    {
        int i = 0;
        i = Integer.parseInt("1a2");
        System.out.println(i);
    }

}
